/**
 * 
 */
package controllers.wechatlab;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.edu.bjtu.entity.impl.lightweight.TCAddDocumentAPI;
import cn.edu.bjtu.entity.impl.lightweight.TCPredictDocumentAPI;
import controllers.BaseController;
import pojo.dto.services.TCClassifyResult;

/**
 * 调用deep4jworkbenc的CONTROLLER接口
 * @author alex
 *
 */
@Controller
@RequestMapping(value="admin/doc")
public class CNNNetworkController extends BaseController{
	@RequestMapping(value="predict.do")
	@ResponseBody  public String cnnPredict(HttpServletRequest req,HttpServletResponse res){
		TCClassifyResult x = new TCPredictDocumentAPI(req).convenienceFire().javaClassResult();
		return jsonDump(x);
	}
	@RequestMapping(value="update.do")
	@ResponseBody  public String cnnUpdate(HttpServletRequest req,HttpServletResponse res){
		return jsonDump(new TCAddDocumentAPI(req).convenienceFire().javaClassResult());
	}

}
